﻿// DlalogBar.cpp: 实现文件
//
#include "DialogBar.h"
#include "../resource.h"		// 主符号
#include "cout.h"
// DlalogBar 对话框


DialogBar::DialogBar(CWnd* pParent /*=nullptr*/)
	: CDialogEx(IDD_DIALOGBAR, pParent)
{

}

BOOL DialogBar::OnInitDialog()
{

	CDialogEx::OnInitDialog();


	// TODO: 在此添加额外的初始化代码

	this->mSlider.SetRange(0, 1000);

	return TRUE;  // 除非将焦点设置到控件，否则返回 TRUE
}

DialogBar::~DialogBar()
{
}

void DialogBar::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_SLIDER, mSlider);
}

void DialogBar::OnCustomdrawSlider(NMHDR* pNMHDR, LRESULT* pResult)
{

	cout << "number:" << this->mSlider.GetPos() << endl;
	*pResult = 0;
}


BEGIN_MESSAGE_MAP(DialogBar, CDialogEx)
	ON_WM_PAINT()
	ON_NOTIFY(NM_CUSTOMDRAW, IDC_SLIDER, &DialogBar::OnCustomdrawSlider)
END_MESSAGE_MAP()


// DlalogBar 消息处理程序
